<?php
    error_reporting(1);
	ini_set('display_errors', 'on');
    Workerman\Protocols\Http::sessionStart();
    if(!isset($_SESSION['USER_ID']) ||!isset($_SESSION['ACCESS_TOKEN'])){
        Workerman\Protocols\Http::header("Location: ./login.php");
        Workerman\Protocols\Http::end();
    }
    $user_id = $_GET["user_id"];
    $access_token = $_GET["access_token"];0.

?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>我的生活</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <link rel="stylesheet" href="./css/sm.css">
    <link rel="stylesheet" href="./css/sm-extend.css">

  </head>
   <body>

  <div class="page-group">
      <!-- 你的html代码 -->
      <div class="page page-current" id="page-1581651169664">

          <header class="bar bar-nav">
            <a class="button button-link button-nav pull-left external" href="./index.php">
				<span class="icon iconfont-sm">&#xe744;</span>
                返回
            </a>
            <h1 class="title">稿件</h1>
          </header>
          <div class="content native-scroll">
              <!-- 这里是页面内容区 -->
              <div class="page-index" id="card_list">
                 
              </div>
          </div>
      </div>
  </div>

    <script type="text/javascript" src="./js/zepto.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/sm.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/sm-extend.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/common.js" charset="utf-8"></script>
    <script>
        $(function(){
            var data = {action:"get_poster_list",param:{user_id:"<?php echo $_SESSION['USER_ID'];?>",history:1}};
            var param = {url:"<?php echo $_SESSION["MOBILE_URL"];?>",type:"POST",dataType:"JSON",data:JSON.stringify(data),access_token:"<?php echo $_SESSION['ACCESS_TOKEN']?>"};
            ajax_request(param,function(result){

                var rtval = result["rtval"];
                rtval.forEach(function(val,index){
                    $("#card_list").append('<div class="card"><div style=""valign="bottom"class="card-header color-white no-border">'+ val["name"]<span style="color: red;"> 已校稿</span></div><div class="card-content"><div class="card-content-inner"><p class="color-gray">发表于  '+val["start_time"]+'</p><span>海报数 '+val["amount"]+'</span></div></div><div class="card-footer"><a href="./proofread.php?id='+val["id"]+'&title='+ val["name"]+'    '+val["number"]+'/3&history=1"class="link external">更多</a></div></div>');
                })
            })
            $.init(); 
        })
    </script>
  

<audio controls="controls" style="display: none;"></audio></body>
</html>